package com.chenjun.core.vo.atten;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.beans.BeanUtils;

import com.chenjun.core.dao.generator.entity.OaDictAttnEqpt;

@SuppressWarnings("serial")
public class AttnEqptDto implements Serializable{
	
		private Integer id;
	
		@NotEmpty
	   	private String code;

		@NotEmpty
	    private String name;

	    private Integer status;

	    private Integer operator;

	    private String note;

	    @NotEmpty
	    private String attnEqptIp;

	  /*  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	    private Date lastGatherTime;*/

	    @NotEmpty
	    private String gatherUserId;

	    private String gatherUserName;

	    
		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public Integer getStatus() {
			return status;
		}

		public void setStatus(Integer status) {
			this.status = status;
		}

		public Integer getOperator() {
			return operator;
		}

		public void setOperator(Integer operator) {
			this.operator = operator;
		}

		public String getNote() {
			return note;
		}

		public void setNote(String note) {
			this.note = note;
		}

		public String getAttnEqptIp() {
			return attnEqptIp;
		}

		public void setAttnEqptIp(String attnEqptIp) {
			this.attnEqptIp = attnEqptIp;
		}

		/*public Date getLastGatherTime() {
			return lastGatherTime;
		}

		public void setLastGatherTime(Date lastGatherTime) {
			this.lastGatherTime = lastGatherTime;
		}*/

		public String getGatherUserId() {
			return gatherUserId;
		}

		public void setGatherUserId(String gatherUserId) {
			this.gatherUserId = gatherUserId;
		}

		public String getGatherUserName() {
			return gatherUserName;
		}

		public void setGatherUserName(String gatherUserName) {
			this.gatherUserName = gatherUserName;
		}
	    
		/**
		 * 根据Bean获取Model模型
		 * @return
		 * PayBean
		 * @throws InvocationTargetException 
		 * @throws IllegalAccessException 
		 */
		public static AttnEqptDto getDtoByModel(OaDictAttnEqpt source) throws IllegalAccessException, InvocationTargetException{
			AttnEqptDto target = new AttnEqptDto();
			BeanUtils.copyProperties(source, target);
			return target;
		}
		
		
		/**
		 * 根据Model获取Bean模型
		 * @return
		 * PayBean
		 * @throws InvocationTargetException 
		 * @throws IllegalAccessException 
		 */
		public static OaDictAttnEqpt getModelByDto(AttnEqptDto source) throws IllegalAccessException, InvocationTargetException{
			OaDictAttnEqpt target = new OaDictAttnEqpt();
			BeanUtils.copyProperties(source, target);
			return target;
		}

}
